<?php

namespace Xrfg\Api\Trading\Spot\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class SymbolRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        $rules = [
            'symbol' => [
                'required', Rule::exists('trading_spot_pairs', 'symbol')
            ],
            'op' => [
                'required', Rule::in([1, 2])
            ],
        ];

        return $rules;
    }
}
